<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>lu_projectProgress_equipment</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link href="ADMIN_PUBLIC/css/bootstrap.min.css" rel="stylesheet">
    <link href="ADMIN_PUBLIC/css/animate.min.css" rel="stylesheet">
    <link href="ADMIN_PUBLIC/css/style.min.css" rel="stylesheet">

    <link rel="stylesheet" href="ADMIN_PUBLIC/css/lu_common.css">
    <link rel="stylesheet" href="ADMIN_PUBLIC/css/lu_projectProgress.css">
    <link rel="stylesheet" href="ADMIN_PUBLIC/css/lu_projectProgress_people.css">
    <link rel="stylesheet" href="ADMIN_PUBLIC/fonts_style/iconfont.css">
    <style>
        #add_people,#edit_people{
            height:450px;
        }
        .workTime_list{
            padding:15px;
        }
        .chooseDay{
            display: none;
        }
        .chooseDay.active{
            display: flex;
        }
        ul.chooseDayList{
            display: flex;
            flex-wrap: wrap;
            position: relative;
            /*height: 190px;*/
        }
        ul.chooseDayList>li{
            width: 30px;
            height: 30px;
            margin: 4px;
            color: #333;
            font-size: 12px;
            text-align: center;
            line-height: 30px;
            cursor: pointer;
        }
        ul.chooseDayList>li.active{
            background-color: #2881C1;
            color: #fff;
        }
        ul.chooseDayList .chooseDayBtn{
            color: #666;
            background-color: transparent;
            font-size: 12px;
            cursor: pointer;
            outline: none;
            height: 26px;
            line-height: 24px;
            margin: 0 0 0 -1px;
            padding: 0 10px;
            border: 1px solid #C9C9C9;
            white-space: nowrap;
            border-radius: 2px;
        }
        ul.chooseDayList .chooseDayBtn_box{
            display: block;
            position: relative;
            width: 100%;
            height: 26px;
        }
        ul.chooseDayList .chooseDayBtn_box>div{
            position: absolute;
            right: 10px;
            bottom: 0;
            display: flex;
        }
    </style>
</head>
<body class="color_fff container-fluid row" style="background-color: #fff">
<include file = 'Common/pro_nav' />
<div class="row projectProgress_table_BOX">
    <include file = 'Common/pro_base' />
    <div class="table_BOX">
        <table class="col-sm-12 table table-striped comTableStyle" id="table_table">
            <thead>
            <tr>
                <th><input type="checkbox" id="checkAll" class="checkboxStyle"></th>
                <th>开始时间</th>
                <!-- <th>结束时间</th> -->
                <th>设备名称</th>
                <th>设备编号</th>
                <th>使用人员</th>
                <th>所属部门</th>
                <th>小时</th>
                <th>设备使用记录</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
        <volist name = 'data' id = 'v'>
            <tr data-index="{$v.id}">
                <td><input type="checkbox" class="checkboxStyle" <if condition = "$v.is_cal == 1">disabled<else /></if>></td>
                <td>{$v.start_time}</td>
                <!-- <td>{$v.end_time}</td> -->
                <td>{$v.dev_name}</td>
                <td>{$v.dev_sn}</td>
                <td>{$v.staff_name}</td>
                <td>{$v.dep_name}</td>
                <td>{$v.work_hours}</td>
                <td class="look_record">
                    <a href="#" class="look_record_btn">查看记录</a>
                    <!-- <div class="tip_hiddenBox work_record_box">
                        <span class="work_record_title">设备使用记录</span>
                        <p class="work_record_main">{$v.work_record}</p>
                        <button class="btn btn-sm btn-success">确认</button>
                    </div> -->
                    <div class="tip_hiddenBox work_record_box">
                        <span class="work_record_title">工时记录</span>
                        <!-- <p class="work_record_main">{$v.work_record}</p> -->
                        <ul style='text-align:left'>
                            <volist name='v.work_record' id='vo'>
                                <!-- <li>
                                    <span data-day='{$vo.day}'>{$vo.date}</span>
                                    <input type="text" value='{$vo.record}'>
                                </li> -->
                                <li>{$vo.date} :  {$vo.record}</li>
                            </volist>
                        </ul>
                        <button class="btn btn-sm btn-success">确认</button>
                    </div>
                </td>
               <if condition  = '$v.is_cal == 0'>
               <td><a href="edit_people" class="edit_table">编辑</a></td>
               <else />
               <td><a href="#" class="edit_table">取消核算</a></td>
               </if>
            </tr>
        </volist>
            </tbody>
        </table>
        <div class="pagination"><ul><li>{$page}</li></ul></div>
        <div class="hidden_box">
            <div class="hidden_box_showBox ">
                <span id="dateVal">筛选</span>
                <i class="iconfont icon-jiantou"></i>
            </div>
            <ul class="hidden_box_hiddenBox">
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">时间：</span>
                    <input type="text" class=" BFBFBF_inputStyle" id="query_year_people" data-query="time" autocomplete="off">
                </li>
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">设备：</span>
                    <!--<input type="text" class=" BFBFBF_inputStyle" data-query="eq">-->
                    <select class="BFBFBF_inputStyle " name="" data-query="eq">
                        <!-- <option>技术部1</option>
                        <option>技术部2</option>
                        <option>技术部3</option>
                        <option>技术部4</option>
                        <option>技术部5</option> -->
                    </select>
                </li>
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">姓名：</span>
                    <!--<input type="text" class=" BFBFBF_inputStyle" data-query="name">-->
                    <select class="BFBFBF_inputStyle " name="" data-query="name">
                       <!--  <option>技术部1</option>
                        <option>技术部2</option>
                        <option>技术部3</option>
                        <option>技术部4</option>
                        <option>技术部5</option> -->
                    </select>
                </li>
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">部门：</span>
                    <select class="BFBFBF_inputStyle " name="" data-query="dep">
                        <!-- <option>技术部1</option>
                        <option>技术部2</option>
                        <option>技术部3</option>
                        <option>技术部4</option>
                        <option>技术部5</option> -->
                    </select>
                </li>
                <li class="hiddenBox_list_btn">
                    <button class="btn btn-sm btn-success" id="query">确定</button>
                    <button class="btn btn-sm btn-success">查找全部</button>
                    <button class="btn btn-sm btn-default">取消</button>
                </li>
            </ul>
        </div>
        <ul class="operation_btn">
            <li><a href="add_people" class="btn btn-success">添加</a></li>
            <!-- <li><a href="#import" class="btn btn-success">批量导入</a></li> -->
            <li><a href="#delete" class="btn btn-success">批量删除</a></li>
            <li><a href="#check" class="btn btn-success">核算</a></li>
        </ul>
        <ul class="animated fadeIn add_hiddenBox" lll="add_people" id='add_people'>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>选择年月：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" id="start_time_add" add_name="start_time_add" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list ver_top chooseDay ">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>选择日期：</label>
                <div class="col-sm-9">
                    <ul id='addList' class='chooseDayList'>
                        <li></li>
                    </ul>
                </div>
            </li>
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>结束时间：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" id="end_time_add" add_name="end_time_add">
                </div>
            </li> -->
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>设备名称：</label>
                <div class="col-sm-9">
                    <!--<input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_equipmentName">-->
                    <select class="form-control table_btn_list_selectStyle" add_name="add_equipmentName">
                    <!-- <option>技术部1</option>
                    <option>技术部2</option>
                    <option>技术部3</option>
                    <option>技术部4</option> -->
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>设备编号：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="add_equipmentNum" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>使用人员：</label>
                <div class="col-sm-9">
                    <!--<input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_name">-->
                    <select class="form-control table_btn_list_selectStyle" add_name="add_name">
                        <!-- <option>技术部1</option>
                        <option>技术部2</option>
                        <option>技术部3</option>
                        <option>技术部4</option> -->
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>所属部门：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="add_department" autocomplete="off">
                    <!--<select class="form-control table_btn_list_selectStyle" add_name="add_department">-->
                        <!--<option>技术部1</option>-->
                        <!--<option>技术部2</option>-->
                        <!--<option>技术部3</option>-->
                        <!--<option>技术部4</option>-->
                    <!--</select>-->
                </div>
            </li>
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>工时(天)：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_workTime" readonly>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 table_btn_list_title">设备使用记录：</label>
                <div class="col-sm-8">
                    <textarea class="textarea_style" add_name="add_equipmentUseRecord"></textarea> -->
                    <!--<input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_workTimeRecord">-->
                <!-- </div> -->
            <!-- </li> -->
            <li class="form-group table_btn_list ver_top">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>工时(h)：</label>
                <div class="col-sm-9">
                    <input type="number" class="BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_workTime" readonly value='0' autocomplete="off">
                    <!-- <p style='color:#ff0000;font-size:14px;margin-top:8px'>注：按照每天8小时标准计算</p> -->
                    <p style='color:#ff0000;font-size:14px;margin-top:8px'>注：按照每日标准工时计算</p>
                </div>
            </li>

            <ul id='add_workTime_list' class='workTime_list'>
                <!-- <li>
                    <span>2018-12-12:</span>
                    <input type="number" class="BFBFBF_inputStyle add_people_input">
                    <i class='iconfont icon-cha'></i>
                </li> -->
            </ul>
            <li class="button_list">
                <button class="btn btn-sm btn-success" id="add_btn">确认添加</button>
                <button class="btn btn-sm btn-success" id="add_AddNew_btn">添加并新增</button>
                <button class="btn btn-sm btn-default cancel_btn">取消</button>
            </li>
        </ul>
        <ul class="animated fadeIn add_hiddenBox" lll="edit_people" id='edit_people'>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>选择年月：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" id="start_time_edit" add_name="start_time_edit" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list ver_top chooseDay active">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>选择日期：</label>
                <div class="col-sm-9">
                    <ul id='editList' class='chooseDayList'>
                        <!-- <li></li> -->
                    </ul>
                </div>
            </li>
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>结束时间：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" id="end_time_edit" add_name="end_time_edit">
                </div>
            </li> -->
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>设备名称：</label>
                <div class="col-sm-9">
                    <select class="form-control table_btn_list_selectStyle" add_name="edit_equipmentName">
                        <!-- <option>技术部1</option>
                        <option>技术部2</option>
                        <option>技术部3</option>
                        <option>技术部4</option> -->
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>设备编号：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="edit_equipmentNum" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>使用人员：</label>
                <div class="col-sm-9">
                    <!--<input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_name">-->
                    <select class="form-control table_btn_list_selectStyle" add_name="edit_name">
                       <!--  <option>技术部1</option>
                        <option>技术部2</option>
                        <option>技术部3</option>
                        <option>技术部4</option> -->
                    </select>
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>所属部门：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="edit_department" autocomplete="off">
                    <!--<select class="form-control table_btn_list_selectStyle" add_name="edit_department">-->
                        <!--<option>技术部1</option>-->
                        <!--<option>技术部2</option>-->
                        <!--<option>技术部3</option>-->
                        <!--<option>技术部4</option>-->
                    <!--</select>-->
                </div>
            </li>
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>工时(天)：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_workTime" readonly autocomplete="off">
                </div>
            </li> -->
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-4 table_btn_list_title">设备使用记录：</label>
                <div class="col-sm-8">
                    <textarea class="textarea_style" add_name="edit_equipmentUseRecord"></textarea> -->
                    <!--<input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_workTimeRecord">-->
               <!--  </div>
            </li> -->
            <li class="form-group table_btn_list ver_top">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>工时(h)：</label>
                <div class="col-sm-9">
                    <input type="number" class="BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_workTime" readonly value='0'>
                    <!-- <p style='color:#ff0000;font-size:14px;margin-top:8px'>注：按照每天8小时标准计算</p> -->
                    <p style='color:#ff0000;font-size:14px;margin-top:8px'>注：按照每日标准工时计算</p>
                </div>
            </li>
            <ul id='edit_workTime_list' class='workTime_list'>
                <!-- <li>
                    <span>2018-12-12:</span>
                    <input type="number" class="BFBFBF_inputStyle add_people_input">
                    <i class='iconfont icon-cha'></i>
                </li> -->
            </ul>

            <li class="button_list">
                <button class="btn btn-sm btn-success" id="save_btn">保存</button>
                <button class="btn btn-sm btn-default cancel_btn">取消</button>
            </li>
        </ul>
    </div>

    <!--内容没填完，弹框-->
    <div class="warning_hiddenBox animated fadeIn" id="yz_modal" box="yz_modal">
        您有内容没有填写完哦！
    </div>
    <!--核算弹框-->
    <div class="tip_hiddenBox animated fadeIn" id="check" lll="check">
            <div class="check_main_box">
                <ul>
                    <li class="check_text_14_000">
                        <span>核算成功记录数：</span>
                        <span>
                        <span class="check_success_num"></span>
                        <span>人</span>
                    </span>
                    </li>
                    <li class="check_text_14_000">
                        <span>核算失败记录数：</span>
                        <span>
                        <span class="check_error_num"></span>
                        <span>人</span>
                    </span>
                    </li>
                </ul>
                <p class="check_error_Reason_text">
                    <span>核算失败原因:</span>
                    <span class="check_error_Reason">设备表内没有相应的核算数据！</span>
                </p>
            </div>
            <ul class="check_btn">
                <li><a href="#" class="btn btn-success toManage">去管理</a></li>
                <li><a href="#" class="btn btn-default cancel_btn">取消</a></li>
            </ul>
        </div>
    <!--删除人员-->
    <div class="add_hiddenBox animated fadeIn" id="delete" lll="delete">
        <p class="delete_tip_text">确认删除吗？</p>
        <div class="delete_tip_btn_box">
            <button class="btn btn-sm btn-success">确认</button>
            <button class="btn btn-sm btn-default">取消</button>
        </div>
    </div>
    <!--导入文件-->
    <div class="add_hiddenBox animated fadeIn" id="import" lll="import">
        <p class="import_tip_text">温馨提示：</p>
        <p class="import_tip_text">请下载统一的模版，并按相应的格式在Excel软件中填写您的业务数据，然后再导入到系统中。</p>
        <form action="/Admin/ProDevice/importDevice" method="post" enctype="multipart/form-data" id="file_form">
            <input type="file" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" class="import_tip_text file_upload_btn" id="file_upload" name="devices">
            <div class="import_tip_btn_box">
                <a class="btn btn-sm btn-success" href="/Excel/tpl/过程管理设备批量导入模板.xls">下载模板</a>
                <button class="btn btn-sm btn-grey">确定导入</button>
            </div>
        </form>
    </div>
</div>

<script src="ADMIN_PUBLIC/js/jquery.min.js"></script>
<script src="ADMIN_PUBLIC/js/laydate/laydate.js"></script>
<script src="ADMIN_PUBLIC/js/lu_projectProgress_equipment.js"></script>
<script>
    $(function(){
        window.query_year_people=''

//        window.start_time_add=''
//        window.end_time_add=''
//        window.start_time_add_month=''
//        window.end_time_add_month=''
//        window.start_time_add_date=''
//        window.end_time_add_date=''
//
//        window.start_time_edit=''
//        window.end_time_edit=''
//        window.start_time_edit_month=''
//        window.end_time_edit_month=''
//        window.start_time_edit_date=''
//        window.end_time_edit_date=''
        laydate.render({
            elem: '#query_year_people', //指定元素
            type:  'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                var dateVal = date.year+'年'+date.month+'月'
                window.query_year_people = dateVal
            }
        });


        /*添加时选择年月*/
        laydate.render({
            elem: '#start_time_add', //指定元素
            type:  'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                // let val = value
                let year = date.year
                let mon = date.month
                let maxDay = 0
                let htmls = ''

                if(mon==2){
                    if( (year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0 ){
                        maxDay = 29
                    }else{
                        maxDay = 28
                    }
                }else if(mon==1||mon==3||mon==5||mon==7||mon==8||mon==10||mon==12){
                    maxDay = 31
                }else if(mon==4||mon==6||mon==9||mon==11){
                    maxDay = 30
                }

                $.ajax({
                    url:'/Admin/ProStaff/getHours',
                    type:'get',
                    data:{
                        time:value
                    },
                    success:function(data){
                        // console.log(data)
                        let work_hours = 8
                        if(data.code==1){
                            work_hours = data.work_hours
                        }

                        for(let i=1; i<=maxDay; i++){
                            htmls+=`<li data-hours=${work_hours||8}>${i}</li>`
                        }
                        htmls+=`
                            <div class='chooseDayBtn_box'>
                                <div>
                                    <button class='chooseDayBtn'>清空</button>
                                    <button class='chooseDayBtn'>确认</button>
                                </div>
                            </div>
                        `
                        $('#addList').attr('data-hours',work_hours||8)
                        $('#addList').html(htmls)
                        $('#add_people').find('li.chooseDay').addClass('active')
                        $('#addList').children('li').removeClass('active')

                    }
                })
                
            }
        })
        /*编辑时选择年月*/
        laydate.render({
            elem: '#start_time_edit', //指定元素
            type:  'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                // let val = value
                let year = date.year
                let mon = date.month
                let maxDay = 0
                let htmls = ''

                if(mon==2){
                    if( (year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0 ){
                        maxDay = 29
                    }else{
                        maxDay = 28
                    }
                }else if(mon==1||mon==3||mon==5||mon==7||mon==8||mon==10||mon==12){
                    maxDay = 31
                }else if(mon==4||mon==6||mon==9||mon==11){
                    maxDay = 30
                }

                $.ajax({
                    url:'/Admin/ProStaff/getHours',
                    type:'get',
                    data:{
                        time:value
                    },
                    success:function(data){
                        // console.log(data)
                        let work_hours = 8
                        if(data.code==1){
                            work_hours = data.work_hours
                        }

                        for(let i=1; i<=maxDay; i++){
                            htmls+=`<li data-hours=${work_hours||8}>${i}</li>`
                        }
                        htmls+=`
                            <div class='chooseDayBtn_box'>
                                <div>
                                    <button class='chooseDayBtn'>清空</button>
                                    <button class='chooseDayBtn'>确认</button>
                                </div>
                            </div>
                        `
                        $('#editList').attr('data-hours',work_hours||8)
                        $('#editList').html(htmls)
                        $('#edit_people').find('li.chooseDay').addClass('active')
                        $('#editList').children('li').removeClass('active')

                    }
                })
                
            }
        })
        // laydate.render({
        //     elem: '#start_time_add', //指定元素
        //     theme: '#2881C1',
        //     done: function(value, date, endDate){
        //         if($('#end_time_add').val()){
        //             let EndTime = (new Date($('#end_time_add').val())).getTime()
        //             let StartTime = (new Date(value)).getTime()
        //             if(EndTime<StartTime){
        //                 $('#yz_modal').html('开始时间不得小于结束时间!')
        //                 $('#yz_modal').addClass('active')
        //                 tipShow()
        //                 return
        //             }else{
        //                 let workTime = Math.ceil((EndTime-StartTime)/1000/3600/24)+1
        //                 $('#add_people').find('[add_name=add_workTime]').val(mon)
        //             }
        //         }
        //     }
        // });
        // laydate.render({
        //     elem: '#end_time_add', //指定元素
        //     theme: '#2881C1',
        //     done: function(value, date, endDate){
        //         if($('#start_time_add').val()){
        //             let StartTime = (new Date($('#start_time_add').val())).getTime()
        //             let EndTime = (new Date(value)).getTime()
        //             if(EndTime<StartTime){
        //                 $('#yz_modal').html('开始时间不得小于结束时间!')
        //                 $('#yz_modal').addClass('active')
        //                 tipShow()
        //                 return
        //             }else{
        //                 let workTime = Math.ceil((EndTime-StartTime)/1000/3600/24)+1
        //                 $('#add_people').find('[add_name=add_workTime]').val(workTime)
        //             }
        //         }
        //     }
        // });
        // laydate.render({
        //     elem: '#start_time_edit', //指定元素
        //     theme: '#2881C1',
        //     done: function(value, date, endDate){
        //         if($('#end_time_edit').val()){
        //             let EndTime = (new Date($('#end_time_edit').val())).getTime()
        //             let StartTime = (new Date(value)).getTime()
        //             if(EndTime<StartTime){
        //                 $('#yz_modal').html('开始时间不得小于结束时间!')
        //                 $('#yz_modal').addClass('active')
        //                 tipShow()
        //                 return
        //             }else{
        //                 let workTime = Math.ceil((EndTime-StartTime)/1000/3600/24)+1
        //                 $('#edit_people').find('[add_name=edit_workTime]').val(workTime)
        //             }
        //         }
        //     }
        // });
        // laydate.render({
        //     elem: '#end_time_edit', //指定元素
        //     theme: '#2881C1',
        //     done: function(value, date, endDate){
        //         if($('#start_time_edit').val()){
        //             let StartTime = (new Date($('#start_time_edit').val())).getTime()
        //             let EndTime = (new Date(value)).getTime()
        //             if(EndTime<StartTime){
        //                 $('#yz_modal').html('开始时间不得小于结束时间!')
        //                 $('#yz_modal').addClass('active')
        //                 tipShow()
        //                 return
        //             }else{
        //                 let workTime = Math.ceil((EndTime-StartTime)/1000/3600/24)+1
        //                 $('#edit_people').find('[add_name=edit_workTime]').val(workTime)
        //             }
        //         }
        //     }
        // });


 // 弹出来的小框框
    function tipShow(){
        window.tipBox = setTimeout(function(){
            // $('#yz_modal').removeClass('active')
            // $('#yz_modal').addClass('fadeOut')
            $('#yz_modal').removeClass('active')
            clearTimeout(tipBox)
        },2000)
    }

    })
</script>
</body>
</html>